#! /bin/bash

 ((i = 0))
while ((i < 17))
do
class_name=$(printf "AFN%02X" $i)
hfile_name=$(printf "AFN%02X.h" $i)
cppfile_name=$(printf "AFN%02X.cpp" $i)

printf "#include <stdio.h>
#include \"$hfile_name\"

" > $cppfile_name

# constructor begin
printf "
$class_name:$class_name(void):GB3761_HandleBase($i)
{\n" >> $cppfile_name

## set parse_function[] begin
 ((x=0))
while  ((x<256))
do
#printf "\tparse_function[$x] = &parseF$x;\n" >> $cppfile_name
 ((x++))
done
## set parse_function[] end


printf "\n/*********************************************/" >> $cppfile_name


## set make_function[] begin
 ((x=0))
while ((x<256))
do
#printf "\tmake_function[$x] = &makeF$x;\n" >> $cppfile_name
 ((x++))
done
## set make_function[] end

printf "}" >> $cppfile_name
 ((i++))
done
## constructor end
